package com.example.mybatis.demo.dao;

import com.example.mybatis.demo.model.ArticleInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface ArticleInfoDao {

    @Select("select tb.id,ta.uid,tb.username,tb.password, " +
            "tb.gender,ta.content,ta.create_time as time1 ,tb.create_time as time2 " +
            "from article_info ta left join user_info tb on ta.uid=tb.id where ta.uid=1;")
    ArticleInfo selectArticleAndUserInfo(Integer id);
}